{% extends "base.html" %}

{% block title %}用户登录{% endblock %}

{% block content %}
<div class="auth-form">
    <h2>用户登录</h2>
    <form action="{{ url_for('login') }}" method="post">
        <div class="form-group">
            <label>用户名：</label>
            <input type="text" name="username" required>
        </div>
        <div class="form-group">
            <label>密码：</label>
            <input type="password" name="password" required>
        </div>
        <button type="submit">立即登录</button>
    </form>
    {% with messages = get_flashed_messages() %}
        {% if messages %}
            <div class="error-msg">{{ messages[0] }}</div>
        {% endif %}
    {% endwith %}
</div>
{% endblock %}
